/*
 * WelcomePanel.java
 *
 * Created on April 8, 2008, 1:13 PM
 */

package protovitae.ui;

/**
 *
 * @author  krattp
 */
public class WelcomePanel extends javax.swing.JPanel {
    
    /** Creates new form WelcomePanel */
    public WelcomePanel() {
        initComponents();
    }
    
    public int getSelectedOption(){
        if(btnLoad.isSelected())
            return 1;
        return 0;
        //Apparently, a button group doesn't have integer values associated with it,
        //so you can only grab the button itself as opposed to an index.
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        grpWelcome = new javax.swing.ButtonGroup();
        lblWelcome = new javax.swing.JLabel();
        btnCreate = new javax.swing.JRadioButton();
        btnLoad = new javax.swing.JRadioButton();

        lblWelcome.setFont(new java.awt.Font("Tahoma", 0, 18));
        lblWelcome.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblWelcome.setText("Welcome to ProtoVitae");

        grpWelcome.add(btnCreate);
        btnCreate.setFont(new java.awt.Font("Tahoma", 0, 14));
        btnCreate.setSelected(true);
        btnCreate.setText("Create a new Simulation");

        grpWelcome.add(btnLoad);
        btnLoad.setFont(new java.awt.Font("Tahoma", 0, 14));
        btnLoad.setText("Load an existing Simulation");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnCreate, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)
                    .addComponent(lblWelcome, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)
                    .addComponent(btnLoad, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblWelcome)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnCreate)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnLoad)
                .addContainerGap(215, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JRadioButton btnCreate;
    private javax.swing.JRadioButton btnLoad;
    private javax.swing.ButtonGroup grpWelcome;
    private javax.swing.JLabel lblWelcome;
    // End of variables declaration//GEN-END:variables
    
}
